﻿@model IEnumerable<JuniorProject.Models.SearchModel>

<table id="table" class="tablesorter">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.PostingID)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Location)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.InsertDate)
            </th>
            <th>
                
            </th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model)
{
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.PostingID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Location)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.InsertDate.Month).
                @Html.DisplayFor(modelItem => item.InsertDate.Day).
                @Html.DisplayFor(modelItem => item.InsertDate.Year)
            </td>
            <td>
                @if (string.Equals(ViewData["AccessLevel"], "2") || string.Equals(ViewData["AccessLevel"], "4"))
                {
                    @Html.ActionLink("Approve Posting", "ApprovePosting", new { id = item.PostingID })
                }
            </td>
        </tr>
}
    </tbody>
</table>